<?php include 'application/views/header.php' ?>


<!-- PAGE PRODUCT -->
<div id="page-product-detail" class="page-content">
    <?php if($Product): ?>
    <!-- Breakcumb -->
    <div class="breadcrumb">
        <ul>
            <li><a href="<?php echo base_url() ?>">Nhà</a></li>
            <li>&gt;</li>
            <li><a href="<?php echo base_url() ?>san-pham.html">Sản phẩm</a></li>
            <li>&gt;</li>
            <li><?php echo $Product['ProductName']?></li>
        </ul>
        <div class="clr"></div>
    </div>
    
    <!-- Show product detail -->
    
    <div class="product-detail-content">
        <div class="product-detail-left">
            <img class="img-product" align="left" src="<?php echo base_url() ?>public/images/products/<?php echo $Product['Image'] ?>" />
            <div class="short-descript">
                <h1><?php echo $Product['ProductName'] ?></h1>
                <?php echo $Product['ProductDescription'] ?>
            </div>
            <div class="clr"></div>
            
            <!-- show detail-->
            <div id="tabs">
            	<ul>
                    <?php if(!empty($Product['ProductCompare'])): ?>
            		<li><a href="#tabs-compare">So sánh</a></li>
                    <?php endif; ?>
            		<li><a href="#tabs-general">Tổng quan</a></li>
            		<li><a href="#tabs-future">Tính năng</a></li>
                    <li><a href="#tabs-picture">Hình chụp màn hình</a></li>
                    <li><a href="#tabs-detail">Chi tiết</a></li>
            	</ul>
                <!-- tab compare -->
                <?php if(!empty($Product['ProductCompare'])): ?>
            	<div id="tabs-compare">
            	   	<?php echo $Product['ProductCompare'] ?>
            	</div>
                <?php endif; ?>
                <!-- tab general -->
            	<div id="tabs-general">
            		<?php echo $Product['ProductGeneral'] ?>
            	</div>
                <!-- tab future -->
            	<div id="tabs-future">
            	   <?php echo $Product['ProductFuture'] ?>
            	</div>
                <!-- tab picture -->
                <div id="tabs-picture">
            		<?php if($Pictures): ?>
                    <?php foreach($Pictures as $picture): ?>
                        <a href="<?php echo base_url() ?>public/images/pictures/<?php echo $picture['PictureLink'] ?>">
                            <img border="0" src="<?php echo base_url() ?>public/images/pictures/<?php echo $picture['PictureLink'] ?>" />
                        </a>
                    <?php endforeach; ?>
                    <?php endif; ?>
            	</div>
                <!-- tab detail -->
                <div id="tabs-detail">
            		<?php echo $Product['ProductDetail'] ?>
            	</div>
             </div>
            <!-- end show tab product detail -->
        </div>
        <div class="product-detail-right">
            <!-- Price and Click Order -->
            <div class="download-area">
                <span class="price"><strong>chỉ có <span id="pr"><?php echo $Product['Price'] ?> VND</span><br></strong> Đăng ký 1 năm cho tối đa 3 máy tính</span>
                <a href="<?php echo base_url() ?>mua-hang/<?php echo $Product['ProductId'] ?>" class="btn-purchase"><span class="btn-download-text">MUA NGAY BÂY GIỜ!</span><br>
                <?php echo $Product['Enviroment'] ?></a> 
                <span class="or">hoặc</span>
                <a class="btn-try" href="<?php echo base_url() ?>san-pham/download/<?php echo $Product['ProductId'] ?>">hãy thử một quét miễn phí</a>
            </div>
            
            <!-- giai thuong -->
            <?php if(count($Awards) > 0): ?>
            <div class="module-header"> <strong>Giải thưởng Mới nhất</strong> </div>
            <div class="module">
                <?php foreach($Awards as $award): ?>
                <a href="<?php echo $award['AwardLink'] ?>" target="_blank">
                    <img src="<?php echo base_url() ?>public/images/awards/<?php echo $award['AwardIcon'] ?>" style="width: 60px; height: 85px;">
                </a>
                <?php endforeach; ?> 
            </div>
            <?php endif; ?>
            
            <!-- Hinh anh chup -->
             <?php if(count($Pictures) > 0): ?>
            <div class="module-header"> <strong>Hình chụp màn hình</strong> </div>
            <div class="module">
                <?php foreach($Pictures as $picture): ?>
                <a href="<?php echo base_url() ?>public/images/pictures/<?php echo $picture['PictureLink'] ?>" 
                    class="single_image" title="<?php echo $picture['PictureName'] ?>">
                    <img src="<?php echo base_url() ?>public/images/pictures/<?php echo $picture['PictureLink'] ?>" />
                </a>
                <?php break; ?>
                <?php endforeach; ?> 
            </div>
            <?php endif; ?>
        </div>        
    </div>
    <?php endif; ?>
    <!-- Show product detail -->    
    <div class="clr"></div>
</div>

<?php include 'application/views/footer.php' ?>
<script>
	$(function() {
		$( "#tabs" ).tabs();
	});
</script>